package com.googlecode.mysqlcommenter.model;

public class Column extends AbstractDbItem {
   public Column(String name, Table table) {
      super(name);
      this.table = table;
   }
   private String type,key,defaultValue, extra;
   private boolean nullable;
   private Table table;
   public String getType() {
      return type;
   }
   public void setType(String type) {
      this.type = type;
   }
   public String getKey() {
      return key;
   }
   public void setKey(String key) {
      this.key = key;
   }
   public String getDefaultValue() {
      return defaultValue;
   }
   public void setDefaultValue(String defaultValue) {
      this.defaultValue = defaultValue;
   }
   public String getExtra() {
      return extra;
   }
   public void setExtra(String extra) {
      this.extra = extra;
   }
   public boolean isNullable() {
      return nullable;
   }
   public void setNullable(boolean nullable) {
      this.nullable = nullable;
   }
   public Table getTable() {
      return table;
   }
   public void setTable(Table table) {
      this.table = table;
   }
   @Override
   public Db getDb() {
      return table.getDb();
   }
   @Override
   public String getDescription() {
      return getDb() +"."+getTable()+"."+getName()+"  :"+type+";"+key;
   }
}
